Skip to content

fix: update TypeScript init scaffold for ESM tooling#81

Merged
L0STE merged 1 commit intoblueshift-gg:masterfrom
beeman:beeman/init-template-fixes
Mar 27, 2026
Merged

fix: update TypeScript init scaffold for ESM tooling#81
L0STE merged 1 commit intoblueshift-gg:masterfrom
beeman:beeman/init-template-fixes

Conversation

@beeman
Copy link
Copy Markdown
Contributor

@beeman beeman commented Mar 24, 2026

Generate ESM package metadata and a typecheck script for TypeScript test projects.

Also switch the generated tsconfig to bundler-style module resolution and refresh the Node and Vitest dev dependency versions.

Comment on lines +80 to +85
"module": "preserve",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "ESNext",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are modern settings that fix the error in the screenshot, and make TypeScript convenient to work with (no need to use .js/.ts for imports, for example).

Image

}},
"devDependencies": {{
"@types/node": "^22.0.0",
"@types/node": "^22.13.0",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version of Node stabilized the WebCrypto api.

"@types/node": "^22.13.0",
"typescript": "^5.9.3",
"vitest": "^3.1.0"
"vitest": "^4.1.1"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the latest version

"private": true,
"type": "module",
"scripts": {{
"check-types": "tsc --noEmit",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having quick access to a type check is useful, it helps find issues like the one fixed in #82

Generate ESM package metadata and a typecheck script for TypeScript test projects.

Also switch the generated tsconfig to bundler-style module resolution and refresh the Node and Vitest dev dependency versions.
@beeman beeman force-pushed the beeman/init-template-fixes branch from aa35388 to 06d53d4 Compare March 26, 2026 18:46
@L0STE L0STE merged commit 6db37d3 into blueshift-gg:master Mar 27, 2026
7 of 8 checks passed
@beeman beeman deleted the beeman/init-template-fixes branch March 27, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants